App({
  onLaunch(options) {
    console.log('App onLaunch', JSON.stringify(options));
    has.login({
      success (res) {
        // 登录成功
        console.log('pkl---login-success',res);
      },
      fail (res) {
        // 登录失败
        console.log('pkl---login-faile',res);
      }
    })
    try {
      let res = has.getSystemInfoSync();
      // 获取状态栏高度和导航栏高度
      console.info(`getSystemInfoSync res.indicatorHeight: ${res.indicatorHeight}, res.statusBarHeight: ${res.statusBarHeight}`);
      has.setStorageSync('statueBarH',res.statusBarHeight)
      has.setStorageSync('indicatorH',res.indicatorHeight)
    } catch(err) {
      console.err(`getSystemInfoSync fail，err:${ err }`);
    }
    // has.onAppShow((res) =>{
    //   console.log('pkl---监听元服务切前台事件')
    //   console.log('监听元服务切前台事件', JSON.stringify(res))
    // })
  },
  onShow(options) {
    console.log('App onShow', JSON.stringify(options));

  },
  onHide() {
    console.log('App onHide');

  },
  onError(msg) {
    console.log('pkl---App onError', JSON.stringify(msg));
  },
});
